package com.gxa.luckin.core.exception;

public enum MessageCode {
    // 把需要的异常信息编排在这里

    ERROR(50000, "对不起，系统开小差了!"),
    ID_EMPTY(50001, "id不能为空!"),
    USERNAME_EMPTY(50002, "用户名不能为空!"),
    GOODS_STATUS(50003, "不能乱传商品状态哦!"),
    CATEGORY_NOT_EXITS(50004, "商品分类不存在!"),
    BANNER_INDEX_QUANTITY(50005, "首页轮播数量有问题!"),
    GOODS_IS_EMPTY(50006, "商品不存在!"),
    LOGIN_SMS_EXPIRE(50007, "手机验证码失效!"),
    LOGIN_SMS_ERROR(50008, "手机验输入错误!"),
    USER_NO(50009, "对不起，账户不能登录"),
    TOKEN_NO(50010, "无效token"),
    SHOP_IS_EMPTY(50011, "门店不存在!"),
    SHOP_ADD_ERROR(50012, "门店添加失败!"),
    SHOP_UPDATE_ERROR(50013, "门店修改失败!"),
    SHOP_DEL_ERROR(50014, "门店删除失败!"),
    ORDER_IS_EMPTY(50015, "订单为空！"),
    PHONE_ERROR(50016,"手机格式错误"),
    LOGIN_ERROR(50017,"验证码错误"),
    TOKEN_ERROR(50018,"token过期或不存在"),
    ADMIN_ERROR(50019,"两次密码不一致"),
    ADMIN_REGISTER_ERROR(50020,"已存在该用户名");

    //错误编码
    private Integer code;

    //错误信息
    private String message;

    MessageCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
